﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人健康档案系统</title>
<link rel="stylesheet" href="<%=basePath%>css/index.css" />
<script type="text/javascript">
function toUserDetails(){
window.location.href="<%=basePath%>index/toUserDetails.do";
	}
function toUpdatePassword(){
window.location.href="<%=basePath%>index/toUpdatePassword.do";
}
</script>
</head>
<body>
	<!-- 全站公用主导航  -->
	<div class="sw-hd">
		<div class="sw-top">
			<div class="layout">
				<div class="sw-top-logo">
					<h1 class="seo">个人健康系统</h1>
					<a href="<%=basePath%>index/list.do">个人健康系统</a>
				</div>
				<div class="sw-top-slogan">
					<a href="#"><img src=""></a>
				</div>
				<div class="sw-top-se">
					<form name="formsearch" action="<%=basePath%>index/list.do" id="global_search_form" method="post">
						 <input name="title"
							class="sw-input" autocomplete="off" placeholder="档案号搜索："
							maxlength="60"> <input type="submit" class="sw-input-btn"
							value="搜索">
					</form>
				</div>
			</div>
		</div>
		<div class="sw-nav">
			<div class="layout">
				<div class="sw-nav fleft">
					<ul>
						<li><a href="<%=basePath%>index/list.do">健康信息</a></li>
						<li><a href="<%=basePath%>index/record.do">记录健康信息</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<!--全站公用主导航 END -->


	<div class="sw-main clearfix">
		<!-- 面包屑 START -->
		<!-- 面包屑 START -->
		<div class="sw-crumb clearfix mb15">
			<ul class="fleft">
				<li><em>当前位置：</em> <a href='<%=basePath%>index/list.do'>健康信息</a>
				</li>
			</ul>
		</div>
		<!-- 面包屑 END -->

		<!-- 面包屑 END -->
		<!-- 左侧容器 START -->
		<div class="sw-w670 fleft">

			<c:forEach items="${recordList}" var="recordList">
				<div class="sw-modBox sw-excerpt">
					<div class="sw-excerpt-hd clearfix">
						<h2 class="fleft">
							<a href="<%=basePath%>index/findRecord.do?id=${recordList.id}">档案号：${recordList.title}</a>
						</h2>
					</div>
					<div class="sw-excerpt-bd">
						<p>${recordList.intro}</p>
					</div>
					<div class="sw-excerpt-ft">
						<span><i class="sw-icon-time"></i> <fmt:formatDate
								value="${recordList.createTime}" pattern="yyyy年MM月dd日HH点mm分ss秒" /></span>
						<span><i class="sw-icon-views"></i></span>
					</div>
				</div>
			</c:forEach>
			<div class="navigation">
				<ul class="pagelist">
					<!-- 首页 -->
					<c:choose>
						<c:when test="${pageNo != 1}">
							<li><a href='<%=basePath%>index/list.do'>首页</a></li>
						</c:when>
						<c:otherwise>
							<li><a>首页</a></li>
						</c:otherwise>
					</c:choose>
					<!-- 上一页 -->
					<c:choose>
						<c:when test="${pageNo != 1}">
							<li><a href='<%=basePath%>index/list.do?pageNo=${pageNo-1}'>上一页</a></li>
						</c:when>
						<c:otherwise>
							<li><a>上一页</a></li>
						</c:otherwise>
					</c:choose>

					<!-- 页数列表 -->
					<c:forEach items="${pageList}" var="pageList">
						<c:choose>
							<c:when test="${pageList == pageNo}">
								<li class="thisclass">${pageList}</li>
							</c:when>
							<c:otherwise>
								<li><a href='<%=basePath%>index/list.do?pageNo=${pageList}'>${pageList}</a></li>
							</c:otherwise>
						</c:choose>
					</c:forEach>
					<!-- 下一页 -->
					<c:choose>
						<c:when test="${pageNo != pageSum}">
							<li><a href='<%=basePath%>index/list.do?pageNo=${pageNo+1}'>下一页</a></li>
						</c:when>
						<c:otherwise>
							<li><a>下一页</a></li>
						</c:otherwise>
					</c:choose>
					<!-- 末页 -->
					<c:choose>
						<c:when test="${pageNo != pageSum}">
							<li><a href='<%=basePath%>index/list.do?pageNo=${pageSum}'>末页</a></li>
						</c:when>
						<c:otherwise>
							<li><a>末页</a></li>
						</c:otherwise>
					</c:choose>
					<li><select name='sldd' style='width:42px'
						onchange='location.href=this.options[this.selectedIndex].value;'>
                            <!-- 下拉框分页 -->
							<c:forEach begin="1" end="${pageSum}" var="pageList">
								<c:choose>
									<c:when test="${pageList == pageNo}">
									   <option value='<%=basePath%>index/list.do?pageNo=${pageList}' selected>${pageList}</option>
									</c:when>
									<c:otherwise>
										<option value='<%=basePath%>index/list.do?pageNo=${pageList}' >${pageList}</option>
									</c:otherwise>
								</c:choose>
							</c:forEach>
					</select></li>
					<li><span class="pageinfo">共 <strong>${pageSum}</strong>页<strong>${pageCount}</strong>条
					</span></li>

				</ul>
			</div>
			<!-- #nav-below .navigation -->
		</div>
		<!-- 侧边 START -->
		<div class="sw-w270 fright">
			<div class="sw-list">
				<h3>个人信息</h3>
				<div class="sw-widget2">
					<p>用户名：${userNew.name}</p>
					<p>真实姓名：${userNew.realName}</p>
					<p>性别：${userNew.sex}</p>
					<br />
					<div class="intro_button">
						<input type="button" onclick="toUserDetails()" value="信息详情">
					</div>
					<div class="intro_button">
						<input type="button" onclick="toUpdatePassword()" value="修改密码">
					</div>
					<br /> <br />
				</div>
			</div>
		</div>
		<!-- 侧边 END -->
	</div>
	<!-- 页尾 START -->
	<div class="f_menu clearfix"></div>
	<div class="copright">
		<a target='_blank' href='http://www.jyzhz.com/'>惠州市金燕子科技有限公司</a>版权所有
	</div>
</body>
</html>